package org.dromara.hmily.demo.springcloud.order.test;

import org.springframework.stereotype.Component;

import javax.servlet.*;
import java.io.IOException;

/**
 * @auther zzyy
 * @create 2021-04-11 17:00
 */
@Component
public class T1 implements Filter
{

    @Override
    public void init(FilterConfig filterConfig) throws ServletException
    {
        System.out.println("T1-----init Filter");
    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException
    {
        System.out.println("T1-----doFilter Filter-----start");
        filterChain.doFilter(servletRequest,servletResponse);
        System.out.println("T1-----doFilter Filter-----end");
    }

    @Override
    public void destroy()
    {
        System.out.println("T1-----destroy Filter");
    }
}
